import Vue from "vue";
import "normalize.css/normalize.css"; // A modern alternative to CSS resets
import ElementUI from "element-ui";
import "element-ui/lib/theme-chalk/index.css";
// import locale from "element-ui/lib/locale/lang/en"; // lang i18n
import "@/styles/index.scss"; // global css
import "./utils/day.js";
import '@/utils/plday.js'
import App from "./App";
import store from "./store";
import router from "./router";
import moment from 'moment'
import '@/assets/font-awesome-4.7.0/css/font-awesome.min.css';
Vue.prototype.$moment = moment
import "@/icons"; // icon
import "@/permission"; // permission control
import Axios from "axios";
import '../mock/mock'
import '../mock/questions'
import '@/api/mock'
import i18n from './Lang'// lang i18n  // 删除这一句
Vue.use(ElementUI, {
  i18n: (key, value) => i18n.t(key, value)
})
import Component from '@/components'
Vue.use(Component) // 注册自己的插件
const { mockXHR } = require("../mock");
mockXHR();
// set ElementUI lang to EN
Vue.config.productionTip = false;
import * as filters from '@/filters' // 引入工具类
// 注册全局的过滤器
Object.keys(filters).forEach(key => {
  // 注册过滤器
  Vue.filter(key, filters[key])
})
new Vue({
  el: "#app",
  router,
  store,
  i18n,
  render: (h) => h(App),
});
